#!/bin/sh

apt install -y build-essential cmake openscenegraph-plugin-osgearth libosgearth-dev libgdal-dev libqt5x11extras5-dev
mkdir build
cd build
cmake CMAKE_BUILD_TYPE:STRING=Release ..
make -j 8
make install
cp src/map/map ../bin

#运行环境
apt install -y xinit xterm
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64
export DISPLAY=:0
cd ../bin
./map
